#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START mtools-native

save_CFLAGS="$CFLAGS"
save_CPPFLAGS="$CPPFLAGS"
save_LDFLAGS="$LDFLAGS"
export CFLAGS='-O2 -g'
unset CPPFLAGS
unset LDFLAGS


reset_mtime mtools mtools/configure.in
mkdir -p build/mtools-native
cd build/mtools-native
../../mtools/configure \
	--host="$BUILD" \
	--build="$BUILD" \
	--prefix="$build_prefix" \
	--disable-xdf \
	--disable-vold \
	--disable-new-vold \
	--disable-floppyd \
	--without-x \
	${AUTOCRAP_KLUDGE}

cd ../..
make_native_build build/mtools-native

export CFLAGS="$save_CFLAGS"
export CPPFLAGS="$save_CPPFLAGS"
export LDFLAGS="$save_LDFLAGS"

# RECIPE END mtools-native
